<?php 
	$ln_base_link ="http://www.7wenku.com/modules/article/"; 
	$ln_sbase_link ="http://www.7wenku.com/files/article/";
	$ln_list_link = "http://www.7wenku.com/modules/article/articlelist.php?page=";
	$ln_n_middle ="articleinfo.php?id=";
	$ln_s_middle = "html/";
	$ln_c_middle = "html/";
	$ln_list_url = $ln_base_link . "series_index.html";
	
	
	
	function make_book_url($ln_base_link,$nid,$ln_n_middle){
		return $ln_base_link . $ln_n_middle . $nid;
	}
	
	function make_story_url($ln_sbase_link,$nid,$ln_s_middle){
		return $ln_sbase_link . $ln_s_middle . (int)($nid/1000) . "/" . $nid . "/index.html";
	}
	
	function make_chapter_url($ln_sbase_link,$cid,$nid,$ln_c_middle){
		return $ln_sbase_link . $ln_c_middle .  (int)($nid/1000) . "/" . $nid . "/" . $cid . ".html";
	}
	
	function make_list_link($pid,$ln_list_link){
		return $ln_list_link . $pid;
	}
	
	function file_get_http_contents($url){
		$content = file_get_contents($url);
		while ($content == false) {
			echo "<font color='red'>读取失败，正在重试</font><BR>";
			ob_flush();
			$content = file_get_contents($url);
		}
		return $content;
	}

?>